package org.jfonia.musicxml.model;

import org.w3c.dom.Node;

/**
 * Key element representing common key signature, indicated by number of sharps or flats.
 * 
 * @author Wijnand
 *
 */
public class Key extends Element
{
	private int	fifths;	// >0: sharps, <0: flats
	// private String mode;	// ignored

	public Key(Node node)
	{
		super(node);
	}
	
	public Key(Node node, int fifths)
	{
		super(node);
		this.fifths = fifths;
	}
	
	public static Key getDefault()
	{
		return new Key(null, 0);	// no sharps/flats
	}

	public void setFifths(int fifths)
	{
		this.fifths = fifths;
	}

	public int getFifths()
	{
		return fifths;
	}
}
